/* 
 * File:   main.cpp
 * Author: hao
 *
 * Created on 2011年5月10日, 上午12:35
 */

#include <cstdlib>
#include "Plugin.h"
#include "apeDecoder.h"

using namespace std;

apeDecoder * apedecoder;

void Init(){
    apedecoder = new apeDecoder;
}

void Destroy(){
    delete apedecoder;
}

bool Checking( void * pData, unsigned long long length ){   
    return apedecoder->Checking( pData, length );
}

bool Decoding( void * pTarget, size_t length, size_t * ReadSize ){
    return apedecoder->Decoding( pTarget, length, ReadSize );
}

void getStatus( unsigned * pFormat, unsigned * pChannels, unsigned * pRate ){
    apedecoder->getStatus( pFormat, pChannels, pRate );
}

bool SetTrack( int Min, int Second, int Frame, int EndMin, int EndSecond, int EndFrame ){
    return apedecoder->SetTrack( Min, Second, Frame, EndMin, EndSecond, EndFrame );
}

bool Seek( int Min, int Second, int Frame ){
    return apedecoder->Seek( Min, Second, Frame );
}

void getTotalTime( int * pMin, int * pSecond, int * pFrame ){
    return apedecoder->getTotalTime( pMin, pSecond, pFrame );
}

const char * prefixSurport(){
    return "ape";
}

